!!! 5
%html
  %head
    %meta{:charset=>"UTF-8"}/
    %title
      JS极简练习
    :css
      li {color: blue;}
      .js li {color: red;}
    :javascript
      var a = ['HTML', 'CSS', "JavaScript"]
      document.write('网页开头：')
      document.write('<ul>')
      for (var j=0; j<a.length; j++){
        document.write('<li>'+a[j]+'</li>')
      }
      document.write('</ul>')

  %body
  %div Hello world
  .js
    :javascript
      document.write('网页中：')
      var a = ['标签', '选择器', '布局', "特效"]

      document.write('<ol>')
      for (var j=0; j<a.length; j++){
        document.write('<li>'+a[j]+'</li>')
      }
      document.write('</ol>')
      document.close()
  %div 你好世界
  :javascript
    document.write('Bonjour')
    document.close()